public class ProcessControlBlock {
	private Process m_process;
	private long m_quantum;
	private State m_state;
	private ProcessBookkeeping m_statistics;
	// Constructor
	//
	public ProcessControlBlock(Process process) {
		m_process = process;
		m_quantum = 0;
		m_state = State.NEW;
		m_statistics = new ProcessBookkeeping();
	}

	//
	// Accessors
	//
	public ProcessBookkeeping getBookkeeping(){
		return m_statistics;
	}
	
	public Process getProcess() {
		return m_process;
	}

	public boolean isQuantumExpired() {
		return m_quantum == 0;
	}

	public long getQuantum() {
		return m_quantum;
	}
	
	public State getState(){
		return this.m_state;
	}
	//
	// Mutators
	//
	public void setState(State state){
		this.m_state = state;
	}

	public void setQuantum(long quantum) {
		m_quantum = quantum;
	}

	public void updatePCB() {
		this.m_statistics.update(this.m_state);
	}
}
